package controller

import (
	"github.com/gin-gonic/gin"
	"net/http"
	"vue-element-plus-admin-go/dao"
	"vue-element-plus-admin-go/global"
	"vue-element-plus-admin-go/model"
)

type DictController struct {
	dictDao *dao.DictDao
}

func NewDictController(dictDao0 *dao.DictDao) DictController {
	return DictController{
		dictDao: dictDao0,
	}
}

func (ctr *DictController) Add(ctx *gin.Context) {
	var book model.Dict
	if err := ctx.ShouldBind(&book); err != nil {
		//logrus.Error("读取Book信息失败")
		ctx.JSON(http.StatusOK, global.NewRespData(global.ERROR, "", nil))
		return
	}

	ctx.JSON(http.StatusOK, global.NewRespData(global.SUCCESS, "", nil))
}
